package com.rerun.entity;


import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rerun.common.util.JsonDateFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 后台BUG收集器
 *
 * @author dax.
 * @version v1.0
 * @since 2017 /9/25 13:16
 */
@TableName("bug_collection")
public class BugCollection extends Model<BugCollection> {

    private static final long serialVersionUID = 920331432175782998L;
    @TableId(type = IdType.UUID)
    private String bugId;
    private String method;
    private String className;
    private String message;
    @JsonSerialize(using = JsonDateFormat.class)
    private Date createTime;


    public String getBugId() {
        return bugId;
    }

    public void setBugId(String bugId) {
        this.bugId = bugId;
    }


    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return bugId;
    }

    @Override
    public String toString() {
        return "{" +
                "bugId:" + bugId +
                ", method:" + method +
                ", className:" + className +
                ", message:" + message +
                ", createTime:" + createTime +
                '}';
    }
}
